package com.fuze.navi.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author sepc_
 * @date 3/17/2021 09:19
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ResetPwdVO implements Serializable {

    private static final long serialVersionUID = -6441265178187955754L;
    /**
     * 输入的新密码
     */
    @NotBlank(message = "新密码不能为空")
    @Pattern(message = "请输入正确格式的密码",regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$")
    private String newPwd;

    /**
     * 第二次输入的新密码，需要和新密码一致
     */
    @NotBlank(message = "确认新密码不能为空")
    @Pattern(message = "请输入正确格式的密码",regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$")
    private String confirmPwd;

}
